using System.Security.Cryptography.X509Certificates;

namespace IDeal.Services
{
    public class DefaultCertificateProvider : ICertificateProvider
    {
        private readonly string _p12FileName;
        private readonly string _password;

        public DefaultCertificateProvider(string p12FileName, string password)
        {
            _p12FileName = p12FileName;
            _password = password;
        }

        public X509Certificate2 GetCertificate()
        {
            return new X509Certificate2(_p12FileName, _password, X509KeyStorageFlags.Exportable);
        }
    }
}